package com.cw.demo.api.impl;

import org.apache.dubbo.config.annotation.DubboService;
import org.apache.shenyu.client.dubbo.common.annotation.ShenyuDubboClient;
import org.springframework.beans.factory.annotation.Value;

import com.cw.demo.api.DemoApi;

/**
 * demo服务实现
 */
@DubboService(version = "${dubbo.service.version}",group = "${dubbo.application.name}",protocol = "${dubbo.protocol.name}")
public class DemoApiImpl implements DemoApi {

    @Value("${dubbo.application.name}")
    private String serviceName;

    @Override
    @ShenyuDubboClient(path = "/sayHello", desc = "sayHello")
    public String sayHello(String name) {
        return String.format("[%s] : Hello, %s", serviceName, name);
    }
}